<!-- 导航URL -->
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-md-12">
        <ol class="breadcrumb">
            <li><a href="index.html">主页</a></li>
            <li>预警阀值设置</li>
            <li class="active"><strong>新增收单服务预警阀值设置</strong></li>
        </ol>
    </div>
</div>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-controller="addWarningSetCtrl">
    <form class="form-horizontal" id="form-advertiseTotal-query"  name="horizontal">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel-body ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>基本信息</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>收单服务ID：</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" ng-model="baseInfo.serviceId" name="serviceId" ng-blur="getServiceInfo()" required maxlength="20">
                                <div class="req_mesg" ng-show="horizontal.serviceId.$dirty && horizontal.serviceId.$invalid">
                                    <span ng-show="horizontal.serviceId.$error.required">收单服务ID不能为空</span>
                                </div>
                            </div>
                            <label class="col-sm-2 control-label">收单机构：</label>
                            <div class="col-sm-2">
                                <select class="form-control" ng-model="baseInfo.acqId"
                                   ng-options="x.value as x.text for x in acqOrgs" disabled></select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">服务类型：</label>
                            <div class="col-sm-2">
                                <select class="form-control" ng-model="baseInfo.serviceType"
                                    ng-options="x.value as x.text for x in acqServiceTypes" disabled></select>
                            </div>
                            <label class="col-sm-2 control-label">服务名称：</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" ng-model="baseInfo.serviceName" disabled>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">预警时间类型：</label>
                            <div class="col-sm-2">
                                <select class="form-control" ng-model="baseInfo.warnTimeType"
                                    ng-options="x.value as x.text for x in warnTimeTypes" ></select>
                            </div>
                        </div>
                        <div class="form-group" ng-show="baseInfo.warnTimeType==2">
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>预警时间：</label>
                            <div class="col-sm-4">
                                <div class="input-group " clock-picker data-autoclose="true">
                                    <input type="text" class="form-control" ng-model="baseInfo.warnStartTime" name="warnStartTime" ng-required="baseInfo.warnTimeType==2">
                                    <span class="input-group-addon">
                                        <span class="fa fa-clock-o"></span>
                                    </span>
                                </div>
                                <div class="req_mesg" ng-show="horizontal.warnStartTime.$dirty && horizontal.warnStartTime.$invalid">
                                    <span ng-show="horizontal.warnStartTime.$error.required">预警开始时间不能为空</span>
                                </div>
                            </div>
                            <div class="col-sm-4">
                                <div class="input-group " clock-picker data-autoclose="true">
                                    <input type="text" class="form-control" ng-model="baseInfo.warnEndTime" name="warnEndTime" ng-required="baseInfo.warnTimeType==2">
                                    <span class="input-group-addon">
                                        <span class="fa fa-clock-o"></span>
                                    </span>
                                </div>
                                <div class="req_mesg" ng-show="horizontal.warnEndTime.$dirty && horizontal.warnEndTime.$invalid">
                                    <span ng-show="horizontal.warnEndTime.$error.required">预警结束时间不能为空</span>
                                </div>
                            </div>
                        </div>
                         <div class="form-group">
                            <label class="col-sm-2 control-label">预警周期：</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="baseInfo.waringCycle" disabled>
                                </div>
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>异常笔数：</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" ng-model="baseInfo.exceptionNumber" name="exceptionNumber"
                                    ng-pattern="/^([1-9])\d{0,10}$/" required>
                                <div class="req_mesg" ng-show="horizontal.exceptionNumber.$dirty && horizontal.exceptionNumber.$invalid">
                                    <span ng-show="horizontal.exceptionNumber.$error.required">异常笔数不能为空</span>
                                    <span ng-show="horizontal.exceptionNumber.$error.pattern">异常笔数只能是正整数</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">状态：</label>
                            <div class="col-sm-2">
                                <select class="form-control" ng-model="baseInfo.warnStatus"
                                    ng-options="x.value as x.text for x in warnStatus"></select>
                            </div>
                        </div>

                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label"></label>
                            <div class="col-sm-8">
                                <button class="btn btn-primary btn-mr20"  ng-click="submit()" ng-disabled="submitting || horizontal.$invalid">保存</button>
                                <button class="btn btn-primary3 btn-mr20" type="button" ng-click="resetForm()">清空</button>
                                <button class="btn btn-primary4 btn-mr20" type="button" ui-sref="org.warningSet">返回</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
